package com.stud.seckill.common.exception;

/**
 * 全局统一异常类
 */
public class GlobalException extends RuntimeException {

    private ResultCode resultCode;

    public GlobalException() {}

    public GlobalException(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.resultCode = resultCode;
    }

    public GlobalException(String message) {
        super(message);
    }

    public ResultCode getResultCode() {
        return resultCode;
    }

    public void setResultCode(ResultCode resultCode) {
        this.resultCode = resultCode;
    }

}
